package com.asohofrucol.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Formula;

import com.asohofrucol.model.intf.BasicSaveEntity;

/**
 * The persistent class for the ruat database table.
 * 
 */
@Entity
@Table(name = "ruat")
public class Ruat implements Serializable, BasicSaveEntity {
	private static final long serialVersionUID = 1L;
	public static String DELETED_STATUS = "-1";

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;

	private String address;

	@Column(name = "associate_last_name_")
	private String associateLastName;

	@Column(name = "associate_name")
	private String associateName;

	@Column(name = "associate_village")
	private String associateVillage;

	@Temporal(TemporalType.DATE)
	@Column(name = "born_date")
	private Date bornDate;

	@Column(name = "catastral_identification")
	private String catastralIdentification;

	private String cellphone;

	@Column(name = "distance_municipality_town")
	private String distanceMunicipalityTown;

	@Column(name = "farm_name")
	private String farmName;

	@Column(name = "farm_sector")
	private String farmSector;

	@Column(name = "farm_total_area")
	private String farmTotalArea;

	@Column(name = "farm_village")
	private String farmVillage;

	@Column(name = "farming_income")
	private String farmingIncome;

	@Column(name = "first_last_name")
	private String firstLastName;

	@Column(name = "first_name")
	private String firstName;

	@Column(name = "follow_last_name")
	private String followLastName;

	@Column(name = "follow_name")
	private String followName;

	@Column(name = "follow_product_other")
	private String followProductOther;

	@Column(name = "id_number")
	private String idNumber;

	@Column(name = "last_grade")
	private String lastGrade;

	@Column(name = "entities_providing_support_name")
	private String entitiesProvidingSupportName;

	// @Column(name="machinery_and_equipment")
	// private String machineryAndEquipment;
	//
	// @Column(name="means_of_transportation")
	// private String meansOfTransportation;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "machinery_and_equipment")
	private ComboValue comboValueMachineryAndEquipment;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "means_of_transportation")
	private ComboValue comboValueMeansOfTransportation;

	@Temporal(TemporalType.DATE)
	@Column(name = "modified_date")
	private Date modifiedDate;

	@Column(name = "modifier_user")
	private String modifierUser;

	@Column(name = "origin_of_credit_other")
	private String originOfCreditOther;

	@Column(name = "people_depend")
	private String peopleDepend;

	@Column(name = "second_last_name")
	private String secondLastName;

	@Column(name = "second_name")
	private String secondName;

	private String status;

	private String telephone;

	@Column(name = "total_family_income")
	private String totalFamilyIncome;

	private String village;
	private String email;

	// bi-directional many-to-one association to AgrarianResource
	@OneToMany(mappedBy = "ruat")
	private List<AgrarianResource> agrarianResources;

	// bi-directional many-to-one association to Associativity
	@OneToMany(mappedBy = "ruat")
	private List<Associativity> associativities;

	// bi-directional many-to-one association to ForestResource
	@OneToMany(mappedBy = "ruat")
	private List<ForestResource> forestResources;

	// bi-directional many-to-one association to LivestockResource
	@OneToMany(mappedBy = "ruat")
	private List<LivestockResource> livestockResources;

	// bi-directional many-to-one association to ProcessTransferInnovation
	@OneToMany(mappedBy = "ruat")
	private List<ProcessTransferInnovation> processTransferInnovations;

	// bi-directional many-to-one association to Survey
	@OneToMany(mappedBy = "ruat")
	private List<Survey> surveys;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "sex")
	private ComboValue comboValueSex;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "id_type")
	private ComboValue comboValueIdType;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "educational_level")
	private ComboValue comboValueEducationalLevel;

	// bi-directional many-to-one association to ComboValue
	// @ManyToOne
	// @JoinColumn(name="department")
	// private ComboValue comboValueDepartament;
	//
	// //bi-directional many-to-one association to ComboValue
	// @ManyToOne
	// @JoinColumn(name="municipality")
	// private ComboValue comboValueMunicipality;

	// bi-directional many-to-one association to ComboValue
	@Column(name = "department")
	private String departament;

	// bi-directional many-to-one association to ComboValue

	@Column(name = "municipality")
	private String municipality;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "using_current_credit")
	private ComboValue comboValueUsingCurrentCredit;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "origin_of_credit_")
	private ComboValue comboValueOriginOfCredit;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "innovation_processes")
	private ComboValue comboValueInnovationProcesses;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "associations_membership")
	private ComboValue comboValueAssociationsMembership;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "reason_not_to_belong")
	private ComboValue comboValueReasonNotToBelong;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "working_in_partnership")
	private ComboValue comboValueWorkingInPartnership;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "confidence_grade")
	private ComboValue comboValueConfidenceGrade;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "follow_product")
	private ComboValue comboValueFollowProduct;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "frequency_of_consultation")
	private ComboValue comboValueFrequencyOfConsultation;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "farm")
	private ComboValue comboValueFarm;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "farm_tenure")
	private ComboValue comboValueFarmTenure;

	// bi-directional many-to-one association to ComboValue
	// @ManyToOne
	// @JoinColumn(name="farm_department")
	// private ComboValue comboValueFarmDepartament;
	//
	// //bi-directional many-to-one association to ComboValue
	// @ManyToOne
	// @JoinColumn(name="farm_municipality")
	// private ComboValue comboValueFarmMunicipality;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "farm_own_water")
	private ComboValue comboValueFarmOwnWater;

	@ManyToOne
	@JoinColumn(name = "farm_aqueduct")
	private ComboValue comboValueFarmAqueduct;

	@ManyToOne
	@JoinColumn(name = "farm_internet_access")
	private ComboValue comboValueFarmInternetAccess;

	@ManyToOne
	@JoinColumn(name = "farm_electric_power")
	private ComboValue comboValueFarmElectricPower;

	// bi-directional many-to-one association to ComboValue
	@Column(name = "farm_department")
	private String farmDepartament;

	// bi-directional many-to-one association to ComboValue
	@Column(name = "farm_municipality")
	private String farmMunicipality;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "waste_management_program")
	private ComboValue comboValueWasteManagementProgram;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "waste_management_program_class")
	private ComboValue comboValueWasteManagementProgramClass;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "availability_of_access_roads")
	private ComboValue comboValueAvailabilityOfAccesRoads;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "paved")
	private ComboValue comboValuePaved;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "no_paved")
	private ComboValue comboValueNoPaved;

	// bi-directional many-to-one association to ComboValue
	@ManyToOne
	@JoinColumn(name = "entities_providing_support")
	private ComboValue comboValueEntitiesProvidingSupport;

	@Formula(value = "CONCAT(first_name, ' ',second_name )")
	private String fullName;

	@Formula(value = "CONCAT(first_last_name, ' ',second_last_name )")
	private String fullLastName;

	public Ruat() {
	}

	public Ruat(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAssociateLastName() {
		return this.associateLastName;
	}

	public void setAssociateLastName(String associateLastName) {
		this.associateLastName = associateLastName;
	}

	public String getAssociateName() {
		return this.associateName;
	}

	public void setAssociateName(String associateName) {
		this.associateName = associateName;
	}

	public String getAssociateVillage() {
		return this.associateVillage;
	}

	public void setAssociateVillage(String associateVillage) {
		this.associateVillage = associateVillage;
	}

	public Date getBornDate() {
		return this.bornDate;
	}

	public void setBornDate(Date bornDate) {
		this.bornDate = bornDate;
	}

	public String getCatastralIdentification() {
		return this.catastralIdentification;
	}

	public void setCatastralIdentification(String catastralIdentification) {
		this.catastralIdentification = catastralIdentification;
	}

	public String getCellphone() {
		return this.cellphone;
	}

	public void setCellphone(String cellphone) {
		this.cellphone = cellphone;
	}

	public String getDistanceMunicipalityTown() {
		return this.distanceMunicipalityTown;
	}

	public void setDistanceMunicipalityTown(String distanceMunicipalityTown) {
		this.distanceMunicipalityTown = distanceMunicipalityTown;
	}

	public String getFarmName() {
		return this.farmName;
	}

	public void setFarmName(String farmName) {
		this.farmName = farmName;
	}

	public String getFarmSector() {
		return this.farmSector;
	}

	public void setFarmSector(String farmSector) {
		this.farmSector = farmSector;
	}

	public String getFarmTotalArea() {
		return this.farmTotalArea;
	}

	public void setFarmTotalArea(String farmTotalArea) {
		this.farmTotalArea = farmTotalArea;
	}

	public String getFarmVillage() {
		return this.farmVillage;
	}

	public void setFarmVillage(String farmVillage) {
		this.farmVillage = farmVillage;
	}

	public String getFarmingIncome() {
		return this.farmingIncome;
	}

	public void setFarmingIncome(String farmingIncome) {
		this.farmingIncome = farmingIncome;
	}

	public String getFirstLastName() {
		return this.firstLastName;
	}

	public void setFirstLastName(String firstLastName) {
		this.firstLastName = firstLastName;
	}

	public String getFirstName() {
		return this.firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getFollowLastName() {
		return this.followLastName;
	}

	public void setFollowLastName(String followLastName) {
		this.followLastName = followLastName;
	}

	public String getFollowName() {
		return this.followName;
	}

	public void setFollowName(String followName) {
		this.followName = followName;
	}

	public String getFollowProductOther() {
		return this.followProductOther;
	}

	public void setFollowProductOther(String followProductOther) {
		this.followProductOther = followProductOther;
	}

	public String getIdNumber() {
		return this.idNumber;
	}

	public void setIdNumber(String idNumber) {
		this.idNumber = idNumber;
	}

	public String getLastGrade() {
		return this.lastGrade;
	}

	public void setLastGrade(String lastGrade) {
		this.lastGrade = lastGrade;
	}

	public String getEntitiesProvidingSupportName() {
		return entitiesProvidingSupportName;
	}

	public void setEntitiesProvidingSupportName(
			String entitiesProvidingSupportName) {
		this.entitiesProvidingSupportName = entitiesProvidingSupportName;
	}

	// public String getMachineryAndEquipment() {
	// return this.machineryAndEquipment;
	// }
	//
	// public void setMachineryAndEquipment(String machineryAndEquipment) {
	// this.machineryAndEquipment = machineryAndEquipment;
	// }
	//
	// public String getMeansOfTransportation() {
	// return this.meansOfTransportation;
	// }
	//
	// public void setMeansOfTransportation(String meansOfTransportation) {
	// this.meansOfTransportation = meansOfTransportation;
	// }

	public ComboValue getComboValueMachineryAndEquipment() {
		return comboValueMachineryAndEquipment;
	}

	public void setComboValueMachineryAndEquipment(
			ComboValue comboValueMachineryAndEquipment) {
		this.comboValueMachineryAndEquipment = comboValueMachineryAndEquipment;
	}

	public ComboValue getComboValueMeansOfTransportation() {
		return comboValueMeansOfTransportation;
	}

	public void setComboValueMeansOfTransportation(
			ComboValue comboValueMeansOfTransportation) {
		this.comboValueMeansOfTransportation = comboValueMeansOfTransportation;
	}

	public Date getModifiedDate() {
		return this.modifiedDate;
	}

	public void setModifiedDate(Date modifiedDate) {
		this.modifiedDate = modifiedDate;
	}

	public String getModifierUser() {
		return this.modifierUser;
	}

	public void setModifierUser(String modifierUser) {
		this.modifierUser = modifierUser;
	}

	public String getOriginOfCreditOther() {
		return this.originOfCreditOther;
	}

	public void setOriginOfCreditOther(String originOfCreditOther) {
		this.originOfCreditOther = originOfCreditOther;
	}

	public String getPeopleDepend() {
		return this.peopleDepend;
	}

	public void setPeopleDepend(String peopleDepend) {
		this.peopleDepend = peopleDepend;
	}

	public String getSecondLastName() {
		return this.secondLastName;
	}

	public void setSecondLastName(String secondLastName) {
		this.secondLastName = secondLastName;
	}

	public String getSecondName() {
		return this.secondName;
	}

	public void setSecondName(String secondName) {
		this.secondName = secondName;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getTelephone() {
		return this.telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getTotalFamilyIncome() {
		return this.totalFamilyIncome;
	}

	public void setTotalFamilyIncome(String totalFamilyIncome) {
		this.totalFamilyIncome = totalFamilyIncome;
	}

	public String getVillage() {
		return this.village;
	}

	public void setVillage(String village) {
		this.village = village;
	}

	public List<AgrarianResource> getAgrarianResources() {
		return this.agrarianResources;
	}

	public void setAgrarianResources(List<AgrarianResource> agrarianResources) {
		this.agrarianResources = agrarianResources;
	}

	public List<Associativity> getAssociativities() {
		return this.associativities;
	}

	public void setAssociativities(List<Associativity> associativities) {
		this.associativities = associativities;
	}

	public List<ForestResource> getForestResources() {
		return this.forestResources;
	}

	public void setForestResources(List<ForestResource> forestResources) {
		this.forestResources = forestResources;
	}

	public List<LivestockResource> getLivestockResources() {
		return this.livestockResources;
	}

	public void setLivestockResources(List<LivestockResource> livestockResources) {
		this.livestockResources = livestockResources;
	}

	public List<ProcessTransferInnovation> getProcessTransferInnovations() {
		return this.processTransferInnovations;
	}

	public void setProcessTransferInnovations(
			List<ProcessTransferInnovation> processTransferInnovations) {
		this.processTransferInnovations = processTransferInnovations;
	}

	public ComboValue getComboValueSex() {
		return this.comboValueSex;
	}

	public void setComboValueSex(ComboValue comboValueSex) {
		this.comboValueSex = comboValueSex;
	}

	public ComboValue getComboValueIdType() {
		return this.comboValueIdType;
	}

	public void setComboValueIdType(ComboValue comboValueIdType) {
		this.comboValueIdType = comboValueIdType;
	}

	public ComboValue getComboValueEducationalLevel() {
		return this.comboValueEducationalLevel;
	}

	public void setComboValueEducationalLevel(
			ComboValue comboValueEducationalLevel) {
		this.comboValueEducationalLevel = comboValueEducationalLevel;
	}

	public String getDepartament() {
		return this.departament;
	}

	public void setDepartament(String departament) {
		this.departament = departament;
	}

	public String getMunicipality() {
		return this.municipality;
	}

	public void setMunicipality(String municipality) {
		this.municipality = municipality;
	}

	public ComboValue getComboValueUsingCurrentCredit() {
		return this.comboValueUsingCurrentCredit;
	}

	public void setComboValueUsingCurrentCredit(
			ComboValue comboValueUsingCurrentCredit) {
		this.comboValueUsingCurrentCredit = comboValueUsingCurrentCredit;
	}

	public ComboValue getComboValueOriginOfCredit() {
		return this.comboValueOriginOfCredit;
	}

	public void setComboValueOriginOfCredit(ComboValue comboValueOriginOfCredit) {
		this.comboValueOriginOfCredit = comboValueOriginOfCredit;
	}

	public ComboValue getComboValueInnovationProcesses() {
		return this.comboValueInnovationProcesses;
	}

	public void setComboValueInnovationProcesses(
			ComboValue comboValueInnovationProcesses) {
		this.comboValueInnovationProcesses = comboValueInnovationProcesses;
	}

	public ComboValue getComboValueAssociationsMembership() {
		return this.comboValueAssociationsMembership;
	}

	public void setComboValueAssociationsMembership(
			ComboValue comboValueAssociationsMembership) {
		this.comboValueAssociationsMembership = comboValueAssociationsMembership;
	}

	public ComboValue getComboValueReasonNotToBelong() {
		return this.comboValueReasonNotToBelong;
	}

	public void setComboValueReasonNotToBelong(
			ComboValue comboValueReasonNotToBelong) {
		this.comboValueReasonNotToBelong = comboValueReasonNotToBelong;
	}

	public ComboValue getComboValueWorkingInPartnership() {
		return this.comboValueWorkingInPartnership;
	}

	public void setComboValueWorkingInPartnership(
			ComboValue comboValueWorkingInPartnership) {
		this.comboValueWorkingInPartnership = comboValueWorkingInPartnership;
	}

	public ComboValue getComboValueConfidenceGrade() {
		return this.comboValueConfidenceGrade;
	}

	public void setComboValueConfidenceGrade(
			ComboValue comboValueConfidenceGrade) {
		this.comboValueConfidenceGrade = comboValueConfidenceGrade;
	}

	public ComboValue getComboValueFollowProduct() {
		return this.comboValueFollowProduct;
	}

	public void setComboValueFollowProduct(ComboValue comboValueFollowProduct) {
		this.comboValueFollowProduct = comboValueFollowProduct;
	}

	public ComboValue getComboValueFrequencyOfConsultation() {
		return this.comboValueFrequencyOfConsultation;
	}

	public void setComboValueFrequencyOfConsultation(
			ComboValue comboValueFrequencyOfConsultation) {
		this.comboValueFrequencyOfConsultation = comboValueFrequencyOfConsultation;
	}

	public ComboValue getComboValueFarm() {
		return this.comboValueFarm;
	}

	public void setComboValueFarm(ComboValue comboValueFarm) {
		this.comboValueFarm = comboValueFarm;
	}

	public ComboValue getComboValueFarmTenure() {
		return this.comboValueFarmTenure;
	}

	public void setComboValueFarmTenure(ComboValue comboValueFarmTenure) {
		this.comboValueFarmTenure = comboValueFarmTenure;
	}

	public String getFarmDepartament() {
		return this.farmDepartament;
	}

	public void setFarmDepartament(String farmDepartament) {
		this.farmDepartament = farmDepartament;
	}

	public String getFarmMunicipality() {
		return this.farmMunicipality;
	}

	public void setFarmMunicipality(String farmMunicipality) {
		this.farmMunicipality = farmMunicipality;
	}

	public ComboValue getComboValueWasteManagementProgram() {
		return this.comboValueWasteManagementProgram;
	}

	public void setComboValueWasteManagementProgram(
			ComboValue comboValueWasteManagementProgram) {
		this.comboValueWasteManagementProgram = comboValueWasteManagementProgram;
	}

	public ComboValue getComboValueAvailabilityOfAccesRoads() {
		return this.comboValueAvailabilityOfAccesRoads;
	}

	public void setComboValueAvailabilityOfAccesRoads(
			ComboValue comboValueAvailabilityOfAccesRoads) {
		this.comboValueAvailabilityOfAccesRoads = comboValueAvailabilityOfAccesRoads;
	}

	public ComboValue getComboValuePaved() {
		return this.comboValuePaved;
	}

	public void setComboValuePaved(ComboValue comboValuePaved) {
		this.comboValuePaved = comboValuePaved;
	}

	public ComboValue getComboValueNoPaved() {
		return this.comboValueNoPaved;
	}

	public void setComboValueNoPaved(ComboValue comboValueNoPaved) {
		this.comboValueNoPaved = comboValueNoPaved;
	}

	public ComboValue getComboValueEntitiesProvidingSupport() {
		return this.comboValueEntitiesProvidingSupport;
	}

	public void setComboValueEntitiesProvidingSupport(
			ComboValue comboValueEntitiesProvidingSupport) {
		this.comboValueEntitiesProvidingSupport = comboValueEntitiesProvidingSupport;
	}

	public List<Survey> getSurveys() {
		return surveys;
	}

	public void setSurveys(List<Survey> surveys) {
		this.surveys = surveys;
	}

	public ComboValue getComboValueFarmOwnWater() {
		return comboValueFarmOwnWater;
	}

	public void setComboValueFarmOwnWater(ComboValue comboValueFarmOwnWater) {
		this.comboValueFarmOwnWater = comboValueFarmOwnWater;
	}

	public ComboValue getComboValueFarmAqueduct() {
		return comboValueFarmAqueduct;
	}

	public void setComboValueFarmAqueduct(ComboValue comboValueFarmAqueduct) {
		this.comboValueFarmAqueduct = comboValueFarmAqueduct;
	}

	public ComboValue getComboValueFarmInternetAccess() {
		return comboValueFarmInternetAccess;
	}

	public void setComboValueFarmInternetAccess(
			ComboValue comboValueFarmInternetAccess) {
		this.comboValueFarmInternetAccess = comboValueFarmInternetAccess;
	}

	public ComboValue getComboValueFarmElectricPower() {
		return comboValueFarmElectricPower;
	}

	public void setComboValueFarmElectricPower(
			ComboValue comboValueFarmElectricPower) {
		this.comboValueFarmElectricPower = comboValueFarmElectricPower;
	}

	public ComboValue getComboValueWasteManagementProgramClass() {
		return comboValueWasteManagementProgramClass;
	}

	public void setComboValueWasteManagementProgramClass(
			ComboValue comboValueWasteManagementProgramClass) {
		this.comboValueWasteManagementProgramClass = comboValueWasteManagementProgramClass;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getFullName() {
		return fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public String getFullLastName() {
		return fullLastName;
	}

	public void setFullLastName(String fullLastName) {
		this.fullLastName = fullLastName;
	}

}